package com.lucky.qa.service.impl;

import com.lucky.qa.mapper.userMapper;
import com.lucky.qa.pojo.user;
import com.lucky.qa.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by lucky on 2017/3/21.
 */
@Service
public class UserServiceImpl implements UserService {

    @Resource
    private userMapper userDao;

    /**
     *
     * @param id
     * @return
     */
    @Override
    public user getById(int id) {
        return userDao.selectByPrimaryKey(id);
    }

    /**
     *
     * @param model
     * @return
     */
    @Override
    public int register(user model) {
       return userDao.insertSelective(model);
    }
}
